package com.wish.wishhouses_market.controller;


import com.wish.wishhouses_market.entity.SysRegion;
import com.wish.wishhouses_market.service.ISysRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vo.ResultEntity;

import java.util.List;

/**
 * <p>
 * 地区表 前端控制器
 * </p>
 *
 * @author fanzijun
 * @since 2021-04-01
 */
@RestController
@RequestMapping("/sysRegion")
public class SysRegionController {
    @Autowired
    ISysRegionService iSysRegionService;

    @RequestMapping("/list")
    public ResultEntity list(Integer parentId){

        List<SysRegion> sysRegionList = iSysRegionService.queryRegionList(parentId);
        return ResultEntity.ok("200","地区表",sysRegionList);
    }
}

